<?php
	unset($data);
	$data['ip'] = intval(getClientIP()); 
	if(!isset($_COOKIE['fullyeetally']))
    {   
        $value = md5(microtime().$data['ip'].rand());   
		
        $overTime = mktime(0,0,0,date('m'),date('d')+1,date('Y'))-time();   
		
		setcookie("fullyeetally",$value,time()+$overTime);
		
		$data['cookie'] = $value;
    }
	else
	{
		$data['cookie'] = $_COOKIE['fullyeetally'];
	}
	
	$data['day'] = strtotime(date('Y-m-d'));   
    $data['time'] = time();   
    $data['uri'] = 'http://'.$_SERVER['SERVER_NAME'].$_SERVER["REQUEST_URI"]; 
    $data['referer'] = $_SERVER['HTTP_REFERER']; 
	$data['pid'] = intval($chanpin_id);
	$data['iid'] = intval($item_id);
	$data['type'] = $tongji_type;
	$loginuser = getUserInfo();
	$data['uid'] = intval($loginuser['id']);
	_Tongji_log::addTongji_logInfo($data);